package com.design.patterns.list.factory.methodfactory;

/**
 * @author Wangzhiwen
 */
public class OrderPizzaFactory {

    public static OrderPizza createOrderPizza(String pizzaRegion){
        if ("BJ".equals(pizzaRegion)){
            return new BJOrderPizza();
        }

        if ("LD".equals(pizzaRegion)){
            return new LDOrderPizza();
        }

        throw new RuntimeException("不支持的地区");
    }

}
